﻿using Nuwanda.Common;
using Nuwanda.TfsSpotlight.Shell.Services.Interfaces;
using Nuwanda.TfsSpotlight.Views.Query;
using StructureMap;

namespace Nuwanda.TfsSpotlight.Commands
{
    /// <summary>Saves all work items</summary>
    [Author("Bartłomiej Legiędź")]
    [Pluggable(CommandsNames.SaveAllWorkItems)]
    public class SaveAllCommand : TabCommandBase<IQueryPresenter>
    {
        public SaveAllCommand(ITabsService tabsService) : base(tabsService) {}

        protected override void SubExecute(IQueryPresenter presenter)
        {
            presenter.HandleSaveAll();
        }
    }
}
